package cn.gjxblog.modules.sys.service.impl;

import cn.gjxblog.common.model.PageInfo;
import cn.gjxblog.common.model.PageRequest;
import cn.gjxblog.modules.sys.dao.SysLogDao;
import cn.gjxblog.modules.sys.entity.SysLogEntity;
import cn.gjxblog.modules.sys.service.SysLogService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * 系统日志
 *
 * @author guojiaxun
 * @date 2019-09-12 09:50:21
 */
@Service("sysLogService")
public class SysLogServiceImpl extends ServiceImpl<SysLogDao, SysLogEntity> implements SysLogService {

    @Override
    public PageInfo searchList(PageRequest request) {
        QueryWrapper<SysLogEntity> ew = new QueryWrapper<>();

        IPage<SysLogEntity> page = this.page(new Page<>(request.getPageNum(), request.getPageSize()),ew);
        return new PageInfo(page);
    }
}